package com.zlc.common.core.position.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zlc.common.common.service.BaseServiceImpl;
import com.zlc.common.core.position.mapper.MayanPlatPositionMapper;
import com.zlc.common.core.position.model.entity.MayanPlatPosition;
import com.zlc.common.core.position.model.vo.MayanPlatPositionVo;
import com.zlc.common.core.position.service.MayanPlatPositionService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author  zl
 * @date 2023-05-08 
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class MayanPlatPositionServiceImpl extends BaseServiceImpl<MayanPlatPositionMapper, MayanPlatPosition, MayanPlatPositionVo> implements MayanPlatPositionService {


    @Override
    public MayanPlatPositionVo getByPositionCode(String positionCode) {
        LambdaQueryWrapper<MayanPlatPosition> wrapper = wrapper().eq(MayanPlatPosition::getPositionCode, positionCode);
        return queryOne(wrapper);
    }
}
